import requests
import json

mic_url = 'https://api.codemao.cn/web/materials?filter_type=CATEGORY&offset=0&limit=30&uncollected=false&category_path=/0005&sort=LATEST_ONLINE'
res = requests.get(mic_url)
jsondata = res.text
dictdata = json.loads(jsondata)
#print(dictdata)
soundlist = dictdata['items']
for i in soundlist:
    link = i['resource_urls'][0]
    name = i['name']
    res = requests.get(link)
    with open(name+'.mp3','wb') as f:
        f.write(res.content)